#pragma once
#include<string>
#include"google/protobuf/service.h"

//RPC控制模块
class MprpcController : public google::protobuf::RpcController
{
public:
  MprpcController();

  void Reset();

  bool Failed() const;

  void SetFailed(const std::string& reason);

  std::string ErrorText()const;

  void StartCancel();

  bool IsCanceled()const;

  void NotifyOnCancel(google::protobuf::Closure* callback);

private:
    bool  _failed;
    std::string _errtext;
};



